package com.tmxk.days01.wmh.Test;

import org.junit.Test;

public class VehicleTest_wmh {
    //@Test 相当于是public static void main(String[] args){}
    @Test
    public void test() {
        //创建机动车类对象
        // 给对象实例赋值     语法: 实例对象名.属性
        //person.name = "杨雷";
        //对象名 方法名()
        Vehicle_wmh v1 = new Vehicle_wmh();
        //  v1.color = "灰";
        v1.setColor("灰");
        v1.setPrice(-100000);
        v1.setbrand("奥迪");
        v1.setname("宝马");
        v1.showInfo();
        //直接通过有参构造赋值
        Vehicle_wmh v2 = new Vehicle_wmh("白", "大众", "上汽大众--白", 1000005);
        Vehicle_wmh v3 = new Vehicle_wmh("黑", "大众", "上汽大众--黑", 2000000);
        //方法调用
        v2.showInfo();
        v3.showInfo();

    }
}
